#pragma once

#include "WorldObject.h"
#include "Plant.h"
#include "Node.h"

class WorldObjectManager
{
	public:
		static WorldObjectManager* GetInstance();
		void Destroy();

		void Initialize(std::vector<std::vector<Node*>> &pGrid);
		void Cleanup();
		void Update(float pDeltaTime);

		void AddObject(WorldObject* pObject);
		void DeleteObject(WorldObject* pObject);

		void CreateMultipleWorldObjects(int pAmount, ObjectTypes pType);
		void CreateWorldObject(int pX, int pY, ObjectTypes pType, bool pReplace);

	private:
		WorldObjectManager();
		~WorldObjectManager();

		static WorldObjectManager* m_xInstance;

		std::vector<WorldObject*> m_vWorldObjects;
		std::vector<std::vector<Node*>> Grid;

		float m_fSpawnDelay;
};

